<template>
  <div class="flex justify-center items-center h-screen">
    <div class="w-52 flex flex-col">
      <el-input v-model="name" class="mt-3" placeholder="请输入用户名" />
      <el-input v-model="password" class="mt-3" placeholder="请输入密码" type="password" />
      <el-button class="mt-3" @click="loginWay"> 登录</el-button>
    </div>
  </div>
</template>

<script name="login" setup>
import {ref} from 'vue'
import {login} from '@/views/login/api/api'

const name = ref('')
const password = ref('')
/**
 * 登录操作
 */
const loginWay = () => {
  login({
    name: name.value,
    password: password.value
  }).then(res => {
    console.log(res)
  })
}
</script>

<style scoped>

</style>